2

I have created a project with nativescript-vue that works fine on emulator and also I can install it to my iphone with tns run ios but when I try to build and IPA and send it to a friend with diawi.com the app installs, the icon and splash screen are fine but then it crashes, I could see this in crash reports:

Exception Type:  EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Exception Note:  EXC_CORPSE_NOTIFY

Now I want to use apple testflight for it, I've bought an apple developer teamid for 80 Euros. And I've specified my teamid in the build.xcconfig file:

// You can add custom settings here
// for example you can uncomment the following line to force distribution code signing
CODE_SIGN_IDENTITY = iPhone Distribution 
// To build for device with Xcode 8 you need to specify your development team. More info: https://developer.apple.com/library/prerelease/content/releasenotes/DeveloperTools/RN-Xcode/Introduction.html
DEVELOPMENT_TEAM = TSxxxxxxxx;
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage;

And also the type of this teamid is distribution, I also have another one with the type developer which doesn't work either. What happens is that when I open the project in xcode with open platform/ios/app.xcodeproj I get this error:

Myapp has conflicting provisioning settings. Myapp is automatically signed for development, but a conflicting code signing identity iPhone Distribution has been manually specified. Set the code signing identity value to iPhone Developer in the build settings editor, or switch to manual signing in the project editor. (in target 'Myapp')

Please note that I've already tried with both my TeamIds in my keychain(one is for distribution one is for developer) and each time I changed both CODE_SIGN_IDENTITY and DEVELOPMENT_TEAM then I did

yes | rm -r platforms
tns platform add ios

I even tried commenting both lines out(hoping to let things go automatic) to no avail.

How can I fix it? Please tell me exactly what I should do step by step, like, don't tell me open project editor, build editor etc. I'd much prefer a command line solution, I'm not so good with these GUI tools :-"

yukashima huksay
  • 5,834
  • 7
  • 45
  • 78

1 Answers1

4

You need to refresh the code signing to set it automatically(It is easy if you don't put specific one).

Open the project in Xcode by running open ./platforms/ios/{appname}.xcworkspace and just disable, enable automatic signing in the general tab of the project file. (as seen in the picture)

Also check this stackoverflow question.

enter image description here

You have two certificates one for development and one for distribution.

The development one is for the internal team in other words for devices that you registered to your account, you can check them in developer.apple.com devices section.

Distribution certificate is for TestFlight, AppStore or another way of distribution. Where you don't have udid-s of all devices and there are not related to your account.

The topic is really big and you need to take a deeper look at it.

You are having this problem because you created your project before haveing a development account. And some of the settings where wrong. Then When you switch them and make them right it won't get updated automatically so you need to refresh them.

yukashima huksay
  • 5,834
  • 7
  • 45
  • 78
m1sh0
  • 2,236
  • 1
  • 16
  • 21
  • "Please tell me exactly what I should do step by step, like, don't tell me open project editor, build editor etc." I'm not good with Xcode. Could you please tell me where I can find that setting exactly? – yukashima huksay Jul 30 '19 at 13:06
  • :) it is easy, but I just add an image it should be clear what you need to do there. – m1sh0 Jul 30 '19 at 13:11
  • @yukashimahuksay is this fine for you? – m1sh0 Jul 30 '19 at 14:04
  • Would you also be so kind as to add some information about the difference between distribution signing and developer signing and in which case one need which one? and how they are different? – yukashima huksay Jul 30 '19 at 14:18
  • @yukashimahuksay I just update it but it is hard to explain everything that you need. I think it is better if you search a little bit more about the code signing in ios. – m1sh0 Jul 30 '19 at 14:32