iOS App Groups Issue - ios

I am trying to setup App Groups for iOS so that I can save data in a host app, to later access the same data from a today extension.
I have followed all of the guides to a T, and still cannot get this working. This is what I have done.
Created the app group on the apple dev portal ("group.com.xxxxxxxxx.app").
Assigned the group to the app id for the host app, as well as the extension.
Enabled App Groups in xcode with the host target selected, and then with the extension selected.
The extension is all checking out okay, but this is what I get when I have the main target selected:
I checked, and the group is added to my app id:
One thing I do notice (possibly not related), is that when I check the group in xcode, it duplicates and looks like this:
That being said, I know for a fact that there is only one app group on the dev portal. When I deselect the app group in xcode, the other disappears:
I have deleted provisioning profiles, and certs. Rebuild the app and tried both automatic and manual signing. I still cannot get the last issue to resolve.
Thank you for looking into it with me!

This happened to me as well, and it turned out somewhere along the line Xcode had nuked the "Team" I had set on my main app target in "General".
If this doesn't solve it for you, I had also cleaned the project and deleted DerivedData before stumbling upon this and setting my Team back to normal, so you may need to follow those steps before going to the "General" tab on your main app target.

Related

Bundle ID not listed App store connect new app list (Xcode 11.4.1)

I have created a developer account for two weeks, and now I want to submit my first App. However, when I click new app, the bundle ID list does NOT show the project I would like to submit, but It do show some projects I used to practice. I have look up a variety of solutions on internet, including sign out and log in again, or clean up my Safari data. I have suspected some reason, but I'm not quite sure if it right?
First doubt : some SDK import?
The Bundle ID shows on the list are some small project I used to practice when I was a beginner. Recently, I have tried to use some SDK like Facebook SDK and Firebase. Facebook and Firebase works fine on my simulator and iPhone devices. So I'm not quite think this might be the reason, nut just type on in case I missed something
Second doubt : Xcode version?
When I tried to using Firebase, since iOS 13.3.1 seems not to support, so I update my iPhone to iOS 13.4.1. However, the Xcode should also be updated to 11.4.1, otherwise it cannot connect to my devices. When I look up the bundle IDs listed on App Store Connect, I think those projects are created before I updated Xcode. The project created after updated not showed on the list. But I have created too many projects to practice, so I'm not quite sure I remembered right. I suspect this might be the reason, anyone else met the same problem after updated Xcode?
By the way, there is also a strange thing confused me. I have deleted some projects I used to practiced on my MAC, but they stilled shown on the list... I have manually deleted on my Apple Developer Web.
1) Go to https://developer.apple.com/account and set up the app with its explicit bundle ID.
2) Then go to https://appstoreconnect.apple.com > "Create new app" > Select the previously created bundle ID.
This does not really have anything to do with SDK usage or Xcode setup. (Automatic code signing might do some steps for you, but the most bullet-proof way is mentioned above)

New Lister app error "The shared application group container is unavailable. Check your entitlements and provisioning profiles for this target..."

I've done everything in the Read Me.
Still after I press play, Simulator runs then crashes with this message:
Failing at line 175:
let toURL = ListUtilities.localDocumentsDirectory.URLByAppendingPathComponent(url.lastPathComponent)
I have no idea what to do.
You have to change the LISTER_BUNDLE_PREFIX to your company bundle ID, like "com.yourcompany.com", and eventually fix the error in App Group option and iCloud option. The first step must be done before step 2 & 3.
First, change the LIST_BUNDLE_PREFIX in project Setting. You find this setting in the "Build Setting" tab of your project (not a target) !!!
Fix App Groupe
Fix iCloud option
Make sure you have changed all instances of com.example.apple-samplecode in the sample code to be appropriate for your application. Not doing so will cause this error.
If the above doesn't work for you, you may have to refresh Xcode's knowledge of your entitlements by pressing the little circle with an arrow button. And one more thing... Make sure you have the CloudKit framework installed and the CloudKit button checked in your iCloud Capabilities panel.

xcode not showing simulator schemes

when i create a new project in xcode, i only see "iOS Device" under the list of possible run schemes. all simulators are missing. the strange thing is, if i do the exact same thing from a different user account, the resulting new project will show all schemes as expected.
i assume there is some kind of file permission problem with one of the user accounts, but i would like to know what the responsible files would be that could cause this. i already tried to repair disk permissions, no change.
i also removed xcode completely and re-installed, but no change.
many posts here suggest that a change of deployment target or settings verification can cure this, but in my case this did not help.

Duplicating the iOS xcode project

I have copied the existing project and changed the name of the project, info.plist, and product name, targets. I wanted to create the same project with different name.
Actually this is done. The project name is changed, I have changed the name of the info.plist and the target name.
The problem I'm facing here is,
whenever I run the newly copied app on my simulator, it opens up the old app.
If I try deleting the old app. this newly created app doesnot open up. just say app is running. And the app is not launched on the simulator
I think some settings update have been missed out, which I'm not able to find out. Any idea what this might be.
Thanks
Create different BundleID for your application.
If this does not work then as a workaround try to delete the old app from the simulator.
You need to change bundle identifier from info.plist to differentiate your app.
Reset your simulator and try running the new app it should work for you

App is crashing after launch

I have Xcode project and under that project I have two targets, two separate apps which core functionality is the same, but they are using different Bundle IDs and different provisioning profiles. In signing certificates only the app ID prefix is the same (i.e., my Team ID).
The first application works fine, but now when I'm starting to run a second application using Xcode profiler, application launched and after splash screen image application crashed without any error information, in the other side when I'm running the applications on the test device everything works fine.
What is the problem? I spent whole my day to this issue , but it didn't help :(
My bet is that something is wrong with certificates/provisioning profile, but I can't figure out what.
Fixed,
problem was connected with preprocessor macroses, I forgot to define preprocessor macroses for Release configuration.

Resources