Giter Site home page Giter Site logo

canvaspop / canvaspop-ios-library Goto Github PK

View Code? Open in Web Editor NEW
6.0 6.0 1.0 6.58 MB

Pop-up Store is a simple and powerful way to offer customers the ability to purchase world class handcrafted canvas prints that are shipped right to their door

Home Page: developers.canvaspop.com

License: Other

Objective-C 62.81% Ruby 10.85% Shell 26.33%

canvaspop-ios-library's People

Contributors

barfoon avatar christaggart avatar karlclement avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Forkers

yothin

canvaspop-ios-library's Issues

There seems to be a memory leak in the PopupStoreController

Each time I open the PopupStoreController and close it, some memory doesn't get released. I think the image passed to the controller is not getting released on close because the memory leak gets higher as I use higher resolution images.

Canvaspop linking problem

Hi everyone....i created demo it's working fine.but i integrate in my existing app then erorr display like 205 duplicate symbol.when i add framework & run then app then problem occur.

Needs to support iPhoneX

The lib needs to be updated for the new iPhoneX screen size and support the top notch and status bar specs.
On the first print screen, the continue button is drawn on top of the status bar.

Delegate Method popupStoreLibWasClosed(_ controller: PopupStoreController) not called

With 1.0.8, the close button works (sends a popupStoreLibWasClosed() message) before the user hits continue, or after a purchase has been made, but not on the option screen, circled red:

IMG_1502

The only way to handle that button is by using:
open func popupStoreEventWasEmitted(_ controller: PopupStoreController!, withEvent eventName: String!, withPayload payload: [AnyHashable: Any]!)

and checking for:

if eventName.contains("userCancelStore") { popupStoreLibWasClosed(controller) }

With 1.0.7 and before, that button would send a message to the delegate and handled with:

popupStoreLibWasClosed(_ controller: PopupStoreController)

Error Code 500 while sending Image

I am trying to send an Image to CanvasPop.

UIImage *imageData = [UIImage imageWithContentsOfFile:filePath];
NSData *previewImage = UIImagePNGRepresentation(imageData);
NSString *urlStr = @"https://store.canvaspop.com/api/push/preview";
NSURL *url = [NSURL URLWithString:urlStr];
NSURLRequest *request = [NSURLRequest requestWithURL:url];
NSMutableURLRequest *mutableRequest = [request mutableCopy];
[mutableRequest addValue:@"basic" forHTTPHeaderField:@"CP-Authorization"];
[mutableRequest addValue:@"XXXXXX" forHTTPHeaderField:@"CP-ApiKey"];
[mutableRequest setHTTPMethod:@"POST"];
[mutableRequest setValue:@"image/jpeg" forHTTPHeaderField:@"photo"];
[mutableRequest setHTTPBody:previewImage];
request = [mutableRequest copy];
AFHTTPRequestOperation *operation = [[AFHTTPRequestOperation alloc] initWithRequest:request];
operation.responseSerializer = [AFJSONResponseSerializer serializer];
[operation setCompletionBlockWithSuccess:^(AFHTTPRequestOperation * _Nonnull operation, id  _Nonnull responseObject) {
    NSLog(@"success code %d",[operation.response statusCode]);
    NSLog(@"success value %@",operation.responseObject);        
} failure:^(AFHTTPRequestOperation * _Nonnull operation, NSError * _Nonnull error) {
    NSLog(@"error code %d",[operation.response statusCode]);

}];
[operation start];

I am getting error code = 500. Please advice what is going wrong here.

Constants class generic name

Hi there! Just a suggestion - I had linker errors when integrating your library because a project (that I inherited) already had a Constants class. I fixed this by renaming my Constants class with a prefix (ie MGConstants), if you do the same it could avoid future issues.

Can't upload to App Store with this Lib!

OK - this is really very frustrating. I am unable to submit my build to Apple that uses this library. I have gone through a lot of trouble to include this library with my app - and now I can't even submit it. I need this issue resolved ASAP or I will be pulling it and not look back.

ERROR ITMS-90535: "Unexpected CFBundleExecutable Key. The bundle at 'Payload/Oilist.app/PopUpLib.bundle' does not contain a bundle executable. If this bundle intentionally does not contain an executable, consider removing the CFBundleExecutable key from its Info.plist and using a CFBundlePackageType of BNDL. If this bundle is part of a third-party framework, consider contacting the developer of the framework for an update to address this issue."

screen shot 2016-06-02 at 7 43 34 pm

Auto-constraints apparently broken/buggy

The debug console is quite noisy. Here is the output that appears after loading the PopUpLib. Sometimes the visual formatting is correct, other times it appears like the image attached.

http://3dtopo.com/canvasPopBroken.jpg

viewWillDisappear2016-03-16 21:37:28.189 My App[6322:1597144] Unable to simultaneously satisfy constraints.
Probably at least one of the constraints in the following list is one you don't want. 
Try this: 
    (1) look at each constraint and try to figure out which you don't expect; 
    (2) find the code that added the unwanted constraint or constraints and fix it. 
(
  "<NSLayoutConstraint:0x7fa96a524620 V:[UIButton:0x7fa96a551890'Close'(30)]>",
  "<NSLayoutConstraint:0x7fa96a556160 V:[UIProgressView:0x7fa96a555cd0]-(10)-[UIButton:0x7fa96a551890'Close']>",
  "<NSLayoutConstraint:0x7fa96a556200 V:[UIProgressView:0x7fa96a555cd0]-(0)-[UIWebView:0x7fa96bc142f0]>",
   "<NSLayoutConstraint:0x7fa96a5562a0 V:[UIButton:0x7fa96a551890'Close']-(10)-[UIWebView:0x7fa96bc142f0]>
 )

Will attempt to recover by breaking constraint 
<NSLayoutConstraint:0x7fa96a524620 V:[UIButton:0x7fa96a551890'Close'(30)]>

Make a symbolic breakpoint at UIViewAlertForUnsatisfiableConstraints to catch this in the debugger.
The methods in the UIConstraintBasedLayoutDebugging category on UIView listed in <UIKit/UIView.h> may also be helpful.
2016-03-16 21:37:28.190 Oilist[6322:1597144] Unable to simultaneously satisfy constraints.
Probably at least one of the constraints in the following list is one you don't want. 
Try this: 
    (1) look at each constraint and try to figure out which you don't expect; 
    (2) find the code that added the unwanted constraint or constraints and fix it. 
(
"<NSLayoutConstraint:0x7fa96a556160 V:[UIProgressView:0x7fa96a555cd0]-(10)-[UIButton:0x7fa96a551890'Close']>",
"<NSLayoutConstraint:0x7fa96a556200 V:[UIProgressView:0x7fa96a555cd0]-(0)-[UIWebView:0x7fa96bc142f0]>",
"<NSLayoutConstraint:0x7fa96a5562a0 V:[UIButton:0x7fa96a551890'Close']-(10)-[UIWebView:0x7fa96bc142f0]>"
)
Will attempt to recover by breaking constraint 
<NSLayoutConstraint:0x7fa96a5562a0 V:[UIButton:0x7fa96a551890'Close']-(10)- [UIWebView:0x7fa96bc142f0]>

Make a symbolic breakpoint at UIViewAlertForUnsatisfiableConstraints to catch this in the debugger.
The methods in the UIConstraintBasedLayoutDebugging category on UIView listed in <UIKit/UIView.h> may also be helpful.

How to implement Swift popupStoreEventWasEmitted?

I am using your iOS API. I am trying to test this delegate method.

- (void)popupStoreEventWasEmitted:(PopupStoreController *)controller withEvent:(NSString*)eventName withPayload:(NSDictionary *)payload;

I am not certain how it is translated to Swift though. I tried:

public func popupStoreEventWasEmitted(controller: PopupStoreController, eventName: String, payload: NSDictionary) {

    print("eventName: \(eventName)")

}

Both with String and NSString datatypes for the event name, but it is not getting called back. I know the delegate is set right because popupStoreLibWasClosed() is called. Note that while the API works, I am unable to import the library which would autocomplete the delegate method for me. I should be able to do this in the view controller but it states not found:

import PopUpLib

I am a little confused how to test it though, the documentation states:

  • Use this delegate method to react to events emitted by the controller.
  • An event will be emitted when the user completes a purchase.

These two statements seem to contradict themselves; how can I react to events if they aren’t sent until a purchased has been completed? Does that mean that no events will be sent until a purchase is completed? If so, I can’t test that with my account in test mode (and I am not going to buy a print every time I test it). Please advise how I can implement and test popupStoreEventWasEmitted.

Please enable Bitcode

Please enable bitcode. I can't ship any of my binaries with bitcode enabled that include your library.

screen shot 2018-07-24 at 1 28 12 pm

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.