nsbundle

Loading External Bundle Files allowed?

帅比萌擦擦* 提交于 2019-12-13 18:11:46
问题 We are trying to load external NSBundle files remotely using a technique similar to below loading NSBundle files on iOS Does anyone know whether apple allow you to do this? I assume as long as you don't change the functionality it is allowed? Thanks for all your help 回答1: You should ask Apple to be sure, but probably no. The bundle can contain image / data resources but also code, and there is a restriction guideline against running code that wasn't in the app when it was reviewed. If you're

Can I migrate purchase between applications in macOS App Store?

前提是你 提交于 2019-12-13 17:44:20
问题 I have several similar applications (A1-A3) with hugely the same codebase. They all do similar things (diagrams), each with a specialisation for a specific use case. I am now considering to create one app (B) that sells the specialisations as an Mac App Store In App Purchase. So basically, I reduce number of applications, but will provide same diagrams, just change how to sell them from dedicated app to in-app. How can I best ensure that buyers of the "old" applications A1-A3 can use the

iOS Change app Language doesn't take effect

孤人 提交于 2019-12-12 01:05:14
问题 I am changing my iOS application preferred language dynamically using this setting: [[NSUserDefaults standardUserDefaults] setObject:[NSArray arrayWithObject:@"ar"] forKey:@"AppleLanguages"]; Then I load a localised resource file from the main NSBundle object, but the loaded file isn't of the new language, it's loaded in the default english language until I restart the application totally then it loads the arabic localisation. I want to force NSBundle to load the resource file in the new

Where to place files in Objective-C and how to read them programmatically with NSBundle

隐身守侯 提交于 2019-12-11 23:10:02
问题 I have been trying to implement SSL Pinning for a hybrid app using a plugin which builds the native code for the required functionality. Inside the generated native project, the Objective-C code includes the following function to read certificate files ( X.509 DER .cer ) from the www/certificates location. // AFSecurityPolicy.m + (NSSet *)certificatesInBundle:(NSBundle *)bundle { NSArray *paths = [bundle pathsForResourcesOfType:@"cer" inDirectory:@"www/certificates"]; NSMutableSet

Accessing assets in iOS7 with NSBundle

随声附和 提交于 2019-12-11 19:02:06
问题 I am having problems updating an app to iOS7 SDK. Before I've used iOS 6 SDK and accessed my mp3 file using a NSURL for the folder like this: NSURL *folderURL = [[NSBundle mainBundle] URLForResource:@"" withExtension:@"" subdirectory:@"AudioGuide"]; Now, using the iOS 7 SDK I always get nil as the value for folderURL and my audio guide doesn't find the mp3's anymore. I've already looked into the generated .app-Bundle for the simulator (in ~/Library/Application Support/...), and I can see the

Warning: NSBundle NSBundle (not yet loaded) was released too many times in iOS simulator

你离开我真会死。 提交于 2019-12-11 18:13:11
问题 I'm getting this error when I try to test my app. If I completely close the simulator and re-launch, I can get past it temporarily, but it always comes back after one or two launches. Does anyone know what this is or how to fix it? Warning: NSBundle NSBundle (not yet loaded) was released too many times. For compatibility, it will not be deallocated, but this may change in the future. Set a breakpoint on __NSBundleOverreleased() to debug Also, how would I set a breakpoint as suggested? I only

Check file exists in a folder inside Directory in iPhone

余生颓废 提交于 2019-12-11 16:26:03
问题 I am new to iPhone, I want to check whether Myfile exists in folder inside DocumentDirectory ? For eg: Myfile.epub is one of my file and i want to check whether this file exists at my DestPath or not ? DestPath is my DocumentDirectory path. DestPath=/Users/krunal/Library/Application Support/iPhone Simulator/5.0/Applications/D414BC19-C005-4D93-896D-A6FB71DE4D21/Documents/Derivatives Any help will be appreciated. 回答1: This solution worked for me.. You don't want to give the entire part of your

NSBundle returns nil

佐手、 提交于 2019-12-11 12:14:11
问题 I wanted to read version information of my application from the plit file. For this I am using a code as shown below. NSString *myFilePath = [[NSBundle mainBundle] pathForResource:@"MyApp-Info" ofType:@"plist"]; // Format output NSLog(@"%@",myFilePath); The output 2010-08-31 17:14:10.095 MyApp[8759:20b] (null) It always returns nil even if I tried to Import an existing file of type, text.txt still return nil, where text.txt is imported in the application. I have goggled for the problem dont

Why does my Swift bundle get the wrong principal class?

落爺英雄遲暮 提交于 2019-12-11 12:13:00
问题 I made a bundle target, and its Info.plist file specifies that a very specific class (let's call it PrincipalClass ) should be its principal class. This class was written in Swift and has the @objc attribute. The Info.plist file is correctly copied over to the bundle, and I have cleaned and rebuilt the project multiple times already. However, when I load the bundle from my Swift framework, its principal class is a different class (let's call it NotPrincipalClass ). It was not marked @objc ,

NSBundleResourceRequest bundlePath

☆樱花仙子☆ 提交于 2019-12-11 11:07:16
问题 [UPDATE AT THE END OF THE QUESTION] I use to play some audio files in my app. I used to store the files in the app, but then I moved to On Demand Resources and NSBundleResourceRequest . I have an IBAction to play a random file, and since I moved to ODR , it is not working. The only thing I changed was NSString *bundleRoot = [[NSBundle mainBundle] bundlePath]; (line 3) NSBundleResourceRequest *request1; - (IBAction)randomPlay { NSString *bundleRoot = [[request1 bundle] bundlePath];