-
Notifications
You must be signed in to change notification settings - Fork 219
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
initWithUrlToZipFile return nil #39
Comments
hi @DannyWithJoy , Can you setup a breakpoint at the [DFUFirmware alloc] initWithUrlToZipFile:] and step into it and show me where the code goes ? |
@mostafaberg , sorry, a very tough day for me today!!! I'm using iOSDFULibrary.framework, so that I can not step into [DFUFirmware alloc] initWithUrlToZipFile:]. Right? The version of the library I am using: I build the latest code here to get the framework. Here is a totally clean sample code for you to understanding what I am facing. Thanks. |
No worries, sorry I missed the part saying that you are using a prebuilt framework, yes you cannot step through that. We don't officially support building frameworks this way as we noticed it gets a bit problematic for many people so we stopped supporting it as an official method of getting the library. can you try removing the framework files and install the library using Cocoapods ? |
Also, your sample code link was to the Library's page , can you check it out and give me a correct link ? |
My bad, sample code is here. |
About the cocoapods, I tried. |
Ok i'm currently looking into it, my initial guess is that some dep. is missing in the .framework file, will verify and let you know soon |
@mostafaberg Great news. It's a big step forward for us. |
Ok i resolved the problem and sent you a pull request that you can find here Let me know if there's anything I can help with! |
@mostafaberg OK. |
@mostafaberg It works. Thanks for your help。 We can finally move on to the next step. |
That's great !, we do not have an address but it's very easy to build them yourself with a single command!, here's how to go it:
Note: Carthage also produces |
I spent so much time to work on this problem, but I figure out with yours help.Thanks you so much😁 |
I used your method, install carthage and create a file named cartfile,........ last get iOSDFULibrary.framework and Zip.framework。 but running failure, dyld: Library not loaded: @rpath/Zip.framework/Zip |
@pjl1234567 Please make sure you follow all the steps correctly and that you read the solutions posted here, if that doesn't work please open up a new issue and let us know all the versions you are using (MacOS, XCode, Library, etc..) |
My Installation :
My Enviorments:
Macos 10.12
Xcode 8.0
Now:
I use the demo firmware "dfu_test_app_hrm_s110.zip" to test the function.
But -initWithUrlToZipFile always return nil.
Am I doing something wrong here?
1.Get URL. Return value is correct. (fileURL = file:///var/mobile/Containers/Data/Application/14F7C7B3-A2F2-4704-87B6-1A5E6EC7C2C9/Library/Caches/GOOTA/ota.zip)
NSURL *fileURL = [NSURL fileURLWithPath:OTA_GO_FIRMWARE_FILEPATH];
2.Test if the file is empty. Return value is correct, it's not empty.
NSData *fileData = [NSData dataWithContentsOfURL:fileURL];
3.Creat DFUFirmware object. Return value is nil.
DFUFirmware *selectedFirmware = [[DFUFirmware alloc] initWithUrlToZipFile:fileURL];
The text was updated successfully, but these errors were encountered: