iphone - adding a xib in ios cocoa touch framework leads to code signing issues -
i have made cocoa touch framework , have added uiviewcontroller nib consumed main project. embedded framework main project. invoke view controller , use xib in main project in simulator. try running on provisioned device, following error,
/users/*/library/developer/xcode/deriveddata/myproj-fznlaigwccdaircejxtqwvegxave/build/products/debug-iphoneos/myframework.framework: code object not signed @ in subcomponent: /users/*/library/developer/xcode/deriveddata/myproj-fznlaigwccdaircejxtqwvegxave/build/products/debug-iphoneos/myframework.framework/testviewcontroller.nib
command /usr/bin/codesign failed exit code 1 i have tried following resolve this,
1) remove xibs build phase , add them in copy files phase "code-sign on copy" checked. eliminates error when try invoke view controller, run time exception saying
*** terminating app due uncaught exception 'nsinternalinconsistencyexception', reason: 'could not load nib in bundle: 'nsbundle </var/mobile/containers/bundle/application/ec8e23cb-d7ae-4185-8b7a-1aab24669027/myapp.app/frameworks/myframework.framework> (not yet loaded)' name 'testviewcontroller'' *** first throw call stack: it seems compiled .nib needs code signed manually using build script.
is there more elegant way solve this? guess missing something
thanks, harikant
such error can occur when rename files outside xcode.
-> remove files project (right click - delete , "remove reference")
->you re-import files in project , ok !
or remove .xib if used it.
*nsarray nib = [[nsbundle mainbundle] loadnibnamed:@"testviewcontroller" owner:self options:nil];
Comments
Post a Comment