How do I create a .storekit file in Xcode? - xcode

I'm currently trying to set up a local environment to test in-app purchases in a macOS application.
Apple's documentation at https://developer.apple.com/documentation/xcode/setting_up_storekit_testing_in_xcode states:
To create a StoreKit configuration file, launch Xcode, then choose File > New > File. In the sheet that appears, enter “storekit” in the Filter search field, select StoreKit Configuration File...
When I filter on "storekit", there is no "StoreKit Configuration File."
What am I doing wrong? Do I need to install some kind of SDK or similar in Xcode?

I use Xcode 12.0 beta (12A6159) on Catalina 10.15.5.
The Storekit configuration file is found and I can create and configure it.
But the Scheme -> Run -> Option does not display a selection option to perform local testing on a macOS project, but only on IOS project.
On the apple documentation StoreKit Test framework is labelled macOS 11.0+
A comment on Apple Dev Forum indicate that this menu appears on a Big Sur configuration for a macOS project, but that Xcode stills connects to Sandbox. Not tried yet on Big Sur.

One thing that can trip people up:
If you are using Swift Packages and you have any source-file or directory from a package selected in the Project Navigator, then the types available in the File->New->File sheet is more restricted.
Select the iOS project, or a Group within it, then File->New->File will contain the StoreKit Configuration File option.

This is a brand new feature, so you need the latest version of Xcode for this - Xcode 12. Please also watch the session https://developer.apple.com/videos/play/wwdc2020/10659/

Related

ITMS 90433 Error for uploading app: Xcode 12.4

When I submit my app to App Store as TestFlight, my app goes invalid binary. Error message is give as follows:
....
ITMS-90433: Invalid Swift Support - The file
libswiftAVFoundation.dylib doesn’t have the correct code signature.
Make sure you’re using the correct signature, rebuild your app using
the current public (GM) version of Xcode, and resubmit it. Don’t just
modify the code signature of libswiftAVFoundation.dylib.
Would you please recommend any practices for library version checking or others if any, to ensure my app submission contains valid binary ?
Updates :
I need to go to the company and rebuild my iOS app using Always Embed Swift Standard Libraries -> YES, no issues
Thank you very much
Go to your project target and then -> Build Settings -> Always Embed Swift Standard Libraries and switch to "NO". (this is if you dont use swift in your project).
On the other hand i've seen this more of an issue that has to do with cleaning your project folder.
https://github.com/flutter/flutter/issues/59830#issuecomment-646603022
Having a physical device connected to xcode while building the app solved it on my site. Note: I use flavors in my flutter project.
For some reason, the command line tools was not set in Xcode preferences. So in my case I opened:
Xcode -> Preferences -> Locations
and set Command Line Tools field to match the current version of Xcode, in my case
Xcode 12.4(12D4e)
Then Archive and upload new binary.

No such module "CreateMLUI"

I am using macOS Mojave Beta (10.14 18A293u) and Xcode 10.0 Beta (10L176w). I created a Swift Playground and I am unable to import CreateMLUI framework in order to use it. I keep getting an import error.
I have tried creating both an iOS Playground and a macOS Playground
Anyone knows what I am doing wrong?
Thanks in advance.
While macOS Mojave and Xcode 10 are in beta you may experience bugs while trying to use CreateML.
#Koen from one of the comments in my question found a topic in Apple Developer Forums with some workarounds. What I did was:
Create a new single view Mac OS (NOT iOS) playground
Use a completely different name if already created a buggy playground (this is important)
Add the import CreateMLUI line
Remove all the other boilerplate code
I found the answer to this problem in the apple developers forum (Can't find the exact link to the post).
You simply have to select the macOS tab when creating a playground.
When you create the playground make sure you select "macOS" tab instead of. "iOS".
This feature is no longer supported in this environment. You can complete this task in the Create ML app. Follow these steps:
Xcode -> Toolbar -> Open Developer Tool -> Create ML -> New Document
Open Xcode menu
Choose Open Developer Tool > Create ML
Press New Document
Select Image Classification
Specify name and a place where the project will be saved
In new versions of macOS, the CreateMLUI library has been deprecated and removed. Instead, create models in CreateML, a developer application inside Xcode.

What option in XCode needs to be changed

ALL,
I'm working with XCode 4.2 on Snow Leopard to build a custom application. It is not intended to be put on the Apple Store.
The question I have is: what option I need to change in order to place the resulting bundle in my home directory and not to the XCode default place?
Thank you.
Go to Xcode > Preferences > Locations.
There you can change the path of the derived data. You can change the location of all your projects' derived data or use the Advanced option to be able to set the location for your targets separately using target settings.

How to make an IPA on XCode 4.3?

I have a Mac OS X Lion setup with XCode 4.3. I am not a registered Apple developer.
I told, via the plist files: /Applications/Xcode.App/Contents/Developer/Platforms/iPhoneOS.platform/Info.plist and
/Applications/Xcode.App/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.0.sdk/SDKSettings.plist, XCode not to require codesigning.
I then compiled my project, just a basic iPhone app project, it ran well in simulator. I could build and archive it, then sign it using a self-created certificate and the archive appeared in the Organizer.
Nothing strange for the moment, but there comes the problem: I have no "Share" button in the organizer. I absolutely need to make an IPA file out of my project if I want it to work under an iPhone as it won't accept xcarchive files. I only get the "Validate" and "Distribute" buttons which both require to be a registered Apple developer. But, no "Share" button which enables building an IPA... for free.
I have gone through XCode settings but nothing seemed to help me there. Even the documentation says a Share button is available in XCode 4.3, so my question is: Why don't I get the possibility to make an IPA? IS there any workaround to get this Share button or make an IPA out of the xcarchive via any command line or whatever?
Here's how you can make an IPA in XCode 4.3:
To Disable Code Signing:
Go to /Applications.
Right click on XCode and select 'Show Package Contents'.
Copy Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.1.sdk/SDKSettings.plist to your desktop. (Make sure to actually copy and paste. No drag and drop)
Open it and under DefaultProperties set CODE_SIGNING_REQUIRED to NO.
Copy it back and replace the original file.
Restart XCode.
Open your project.
In Project Navigator select your project and open Build Settings section of your porject (and not any particular target)
Under Code Signing find Code Signing Identity and for both Debug and Release modes set Any iOS SKD to Don't Code Sign.
Now you should be able to build your project without any errors.
To make an IPA:
In 'Project Navigator' select Products
Right click on [NameOfYourProject].app and select 'Show in Finder'.
Create a folder and name it Payload
Move [NameOfYourProject].app to Payload.
Compress Payload and rename it to [NameOfYourProject].ipa
You should be able to get an IPA by clicking 'Distribute...' in Organizer->Archives, and choosing to 'Save for Enterprise or Ad-Hoc Deployment'.
Beginning iOs 5.1 Apple moved their files from /Developer/... to XCode->Show Package Content
In order to export codesign_allocate correctly run this line on your Mac terminal :
export CODESIGN_ALLOCATE=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/codesign_allocate

The selected run destination is not valid for this action

I have opened a project that has always been iphone/ipad. I can't build it now because for some reason my only "Scheme" option is "MyApp My Mac 64-bit". How can I get this set back to iphone/ipad simulator and devices? My "Targeted Device Family" setting is iPhone/iPad.
I had that issue several times. Basically, just set the Base SDK in Build Settings to Latest OS X and it should work properly.
I ran in to this issue recently and i solved it by changing the value of the executable from "None" to "AppName.app" on xcode.
You should change:
Product > Edit scheme -> Run AppName.app -> Info tab -> Executable -> None
to:
Product > Edit scheme -> Run AppName.app -> Info tab -> Executable -> AppName.app
Have you tried editing the Scheme? (I'm assuming you are running XCode 4). I believe you just might need to set the "Base SDK" setting to "iphoneos" (this translates to "Latest iOS").
I was facing same issue in my application and I solved it by following these steps:
1. Go to Project-> Build Settings
2. Change BaseSDK to Latest OS
The above solutions didn't work for me because Xcode 4 didn't give me any choices to go back to iOS. I closed Xcode, opened it again, and then it worked!
I have the same problem, it appears that you also made the jump with the new Xcode 4 upgrade and this appears to be a code incompatibility.
If you want to keep it for IOS (Iphone / Imac ) edit Scheme [Product/Edit Scheme/ Build/ build => Destination drop down list.
Make sure you have installed the Ios SDK before running Xcode.
Elsewhere if you have to compile the same app for the Mac, I'd like also to know the answer as this generate the same errors as you.
I had similar issue recently. Got it solved by doing some changes in Base SDK of Project. Following are steps :
Click on the top-level project icon in the left hand panel
In the right hand panel that appears, select Build Settings (near the top).
Select "All" option (instead of Combined)
Ensure Base SDK is set appropriately, like "OS X 10.7", "Latest iOS(6.1)" etc.
I also just ran in to the issue. For me I was trying to "Build for Testing" and was running into this error.
To fix it I had to "Edit Scheme..." and then in the "Build" dropdown click on "Build" and made sure to check the "Test" checkbox for the Target.
I had the same error message. My solution is to delete the info.plist file from build phrases -> copy bundle resources.
Deployment target is missing for specified SDK ...
Choose other "Deployment Target" (in the Build settings) and simulator will appear.
Note:It's happening when use 5.1 SDK(latest) with XCode 4 on Snow Leopard..
I've just got this error, for me it was because of some reasons my device name didn't appear in xcode devices dropdown, just a generic name. Unplugged and plugged back the device and was fine.
For me I had to combine a couple of the solutions here to get it to work. For me the Project Build Settings were set to "Latest iOS" already.
To fix it, I had to change it to "OS X 10.6", then build the app (it will fail to build), then set it back to "Latest iOS", which now works again.
I just installed Xcode 4.1 (painful!) and when I opened one of my apps that built fine before the upgrade, the only active scheme was "My 64-bit Mac". In this case, the required change was to Edit Schemes, and for the Build scheme's Info tab, set the Executable dropdown to my target. It was set to None. As soon as I did that, the simulator/device showed up instead.
Tried the rest of these with no joy.
AFIAK this is a version control problem, in general not just a Git problem!
I gave a colleague a copy of a project that had modified files in it and this problem occurred.
However when I committed/updated the repo and gave him fresh copy.
This problem was fixed!
I've hit the same issue, needing to build with the 10.6 SDK. But I've found that XCode 4.4 doesn't contain this SDK! So I had to put it back, by opening the XCode.app package contents, and going to:
XCode.app/Contents/Developer/Platforms/MacOSX.platforms/Developer/SDKs
and copying in MacOSX10.6.sdk from my old XCode 3 Developer folder.
Surprisingly enough, this works! When you quit and relaunch XCode, and select the Base SDK for the project, 10.6 appears in the drop-down.
But beware, when XCode installs an update, you'll have to repeat this process, as I found just now after updating to 4.4.1.
I got same error and for some reason after going through all these it did not work. Notice in the very top menue is had my App Name> IOS Developer. Changed to App Name> IPhone 5.0 and went right into Simulator and got no error.

Resources