Is it possible in the templateInfo.plist to change where a framework is loaded from?
I can't seem to find how to change it with the framework also being installed to the iPhoneOS#.#SDK and iPhoneSimulatorOS#.#SDK System/Library/Frameworks directories.
I have my framework loading from those directories where it is installed but I have a request to change the template to load the framework from another install location to minimize disk space.
Example plist xml:
<key>Frameworks</key>
<array>
<string>MobileCoreServices</string>
<string>My_New_SDK</string>
<string>AddressBook</string>
<string>AddressBookUI</string>
<string>AudioToolbox</string>
<string>AVFoundation</string>
<string>CFNetwork</string>
<string>CoreGraphics</string>
<string>CoreLocation</string>
<string>CoreTelephony</string>
<string>ExternalAccessory</string>
<string>Foundation</string>
<string>MapKit</string>
<string>MessageUI</string>
<string>MediaPlayer</string>
<string>Security</string>
<string>SystemConfiguration</string>
<string>QuartzCore</string>
<string>UIKit</string>
</array>
If you remove the My_New_SDK from the frameworks list of the target area of the template, you can create a Node in the template for the framework and specify the absolute path in that node. Do not forget to add the node to the Nodes array in the template plist
<key>MY_New_SDK.framework</key>
<dict>
<key>Path</key>
<string>/PATH_TO_FRAMEWORK/My_New_SDK.framework</string>
<key>PathType</key>
<string>Absolute</string>
</dict>
Related
I need help adding this code from Facebook to enable advertiser tracking. Here is a link to the description. I do not know where to place the code in Xcode’s source code. Can someone help me?
The link below has the code.
https://developers.facebook.com/docs/setting-up/platform-setup/ios/SKAdNetwork
enter image description here
The guide that you linked says:
Add the following SKAdNetwork IDs to your Xcode project’s Info.plist
So, add them! Note that the example is in XML form, but the Info.plist is displayed visually. You need to Right-Click -> Open As -> Source Code.
Then just paste them in.
<key>SKAdNetworkItems</key> /// make sure you also add this line
<array>
<dict>
<key>SKAdNetworkIdentifier</key>
<string>v9wttpbfk9.skadnetwork</string>
</dict>
<dict>
<key>SKAdNetworkIdentifier</key>
<string>n38lu8286q.skadnetwork</string>
</dict>
</array>
The example doesn't include <key>SKAdNetworkItems</key>, but you need to add this (check out the For more information section)
I am using Xamarin Forms. I was facing one weird issue from the past two days. First I have created App with assets catalog and not included a key for "CFBundleIconName". Then after just a few minutes, I got an error like
A value for the Info.plist key 'CFBundleIconName' is missing in the bundle "xxx".
Then after I have tried with assets catalog and removed above key from info.plist file. Then I got an error like
Missing Asset Catalog - Your app is missing the asset catalog file
If I am removing below lines from a plist file then getting 120X120 icon file missing.
<key>XSAppIconAssets</key>
<string>Media.xcassets\AppIcons.appiconset</string>
<key>CFBundleIcons</key>
<dict>
<key>CFBundlePrimaryIcon</key>
<dict>
<key>CFBundleIconName</key>
<string>icon</string>
<key>CFBundleIconFiles</key>
<array>
<string>icon-20#2x.png</string>
<string>icon-20#3x.png</string>
<string>icon-29#2x.png</string>
<string>icon-29#3x.png</string>
<string>icon-40#2x.png</string>
<string>icon-40#3x.png</string>
<string>icon-60#2x.png</string>
<string>icon-60#3x.png</string>
</array>
</dict>
</dict>
Are the above lines are necessary to include in plist file? What other things are necessary to include in plist file.
And My project structure is :
What is wrong with my code? How can I add all files and assets?
Any idea?
Delete all images and those lines from the info.plist.
Your Info.Plist should have the following lines:
<key>XSAppIconAssets</key>
<string>Assets.xcassets/AppIcon.appiconset</string>
<key>XSLaunchImageAssets</key>
<string>Assets.xcassets/LaunchImage.launchimage</string>
Add all the required icons to Asset Catalogs/Media
Trying to create a distribution for testing. When the link is clicked in safari on the ios device nothing happens (literally. No errors). We are using an enterprise cert and a universal distribution profile. The mime types are correct and everything worked great until we moved to a new folder on the web server. Please help. If there's a way to see what the error is in safari that would be a good start.
Here's the relevant code.
html
<html>
<head>
<title>
test
</title>
</head>
<body>
<center>
<h1>Test</h1>
<a href=itms-services://?action=download-manifest&url=http://uri/app.plist>Install</a>
</center>
</body>
</html>
plist
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>items</key>
<array>
<dict>
<key>assets</key>
<array>
<dict>
<key>kind</key>
<string>software-package</string>
<key>url</key>
<string>http://uri/app.ipa</string>
</dict>
</array>
<key>metadata</key>
<dict>
<key>bundle-identifier</key>
<string>appId</string>
<key>bundle-version</key>
<string>1</string>
<key>kind</key>
<string>software</string>
<key>title</key>
<string>apptitle</string>
</dict>
</dict>
</array>
</dict>
</plist>
edit
wiping the iPad in question seems to work, but this isn't really a viable solution if it happens to a personal device. Any other possible solutions?
I had the same problem on iOS8. The install button would automatically disable in Safari. The cause was that my plist file was invalid. That seems odd at first but apparently Safari checks the link out before you even click it. I grabbed a copy of the plist file from a previous build and (after updating the app version number) it worked. It's also worth noting that Xcode 6 doesn't generate plist files like the older versions did. For more info on Xcode 6/plist you can check out this link as well:
Xcode 6 Save for Enterprise Deployment does not create plist for ipa anymore?
I was having this issue and rebuild and archiving with Xcode 4.6.2 (released April 15) has resolved it for me.
I'm using Xcode 4.2 and I'm trying to use Core Data. Upon clicking the .xcdatamodeld file I see a strange view instead of the Data Model Editor View.
I have reinstalled Xcode 4.2 and have even created a starter project from scratch with Core Data Enabled but the issue persists. When I create a Data Model using new file --> Data Model. It is not being recognized as a DataModel. Ctrl+Click --> 'Open As' only displays a "Preview" option. I compared my basic project with that created on a different machine (where everything works fine). A directory diff reveals :
The Foos.xcdatamodeld file was placed under the "Copy Bundle Resources" section of the project's Build Phase instead of being under the "Compile Sources" section. I moved this file to the "Compile Sources" section but the data model editor still doesn't display.
The Foos/Foos.xcdatamodeld/.xccurrentversion file in the working project looked like
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>_XCCurrentVersionName</key>
<string>Foos.xcdatamodel</string>
</dict>
</plist>
while in the non-functional one it was
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
</dict>
</plist>
The only other difference I noticed was that the working version had the following in the project.pbxproj file
/* Begin XCVersionGroup section */
831B12C114A7F73600524A33 /* Foos.xcdatamodeld */ = {
isa = XCVersionGroup;
children = (
831B12C214A7F73600524A33 /* Foos.xcdatamodel */,
);
currentVersion = 831B12C214A7F73600524A33 /* Foos.xcdatamodel */;
path = Foos.xcdatamodeld;
sourceTree = "";
versionGroupType = wrapper.xcdatamodel;
};
/* End XCVersionGroup section */
while the broken one did not have this entry.
I did a directory compare of /Developer/Platforms/iPhoneOS.platform/Developer/Library/Xcode/Templates on my two machines and the templates are identical.
So I'm wondering what part of Xcode is causing the above differences on my primary dev machine. Any suggestions on things to try or what might be causing this issue?
I ran into a similar issue. The problem was the projects directory structure and how it was configured in XCode.
More details here: XCode Cant' Edit CoreData Model
I also ran into this.
I was finally able to get xcode 4.6.3 to restore the interactive editor by opening the .xcdatamodeld in my project and changing the File Type (in the file inspector) from Versioned Core Data Model to Core Data Model. I was able to change it back to Versioned Core Data Model, later, and things kept working.
I had the same problem, but by creating another user account on my Mac, I was able to create a project with Core Data where the editor opens normally. It appeared my user profile was corrupt and it couldn't be resolved by reinstalling Xcode.
When creating a new data model, go to Editor > Add Model Version
That fixed it for me! :)
I solved the problem by opening the package contents of xcdatamodeld, dragging out the file inside with the same name and using it instead, thanks to this answer.
What's the right way to go about saving data like Pages, Numbers and other OSX applications do? That is, it looks like a file to the user, but is in fact a directory (a bundle?) containing a variety of stuff. I have some fairly complex data that I'd like to store in the same way; in particular, some sensor data that needs to be associated with video files.
The Apple official docs on the topic are probably a good starting point.
From the Pages Info.plist file:
<key>CFBundleDocumentTypes</key>
<array>
<dict>
<key>CFBundleTypeExtensions</key>
<array>
<string>pages</string>
</array>
[...]
<key>LSTypeIsPackage</key>
<true/>
[...]
</dict>
</array>
seem to be what does the trick.
It also looks like NSFileWrapper may be part of the answer:
Document-Based Applications Overview FAQ.