rhodes 3.3.0 → 3.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/doc/build.txt +18 -2
- data/platform/android/Rhodes/jni/src/rhodesapp.cpp +7 -0
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/RhodesService.java +1 -0
- data/platform/iphone/Classes/Signature/SignatureDelegate.h +9 -0
- data/platform/iphone/Classes/Signature/SignatureDelegate.m +66 -1
- data/platform/iphone/Classes/Signature/SignatureView.h +8 -0
- data/platform/iphone/Classes/Signature/SignatureView.m +43 -6
- data/platform/iphone/Classes/Signature/SignatureViewController.h +7 -1
- data/platform/iphone/Classes/Signature/SignatureViewController.m +16 -1
- data/version +1 -1
- metadata +3 -3
data/doc/build.txt
CHANGED
@@ -141,8 +141,8 @@ The resulting application package (*.app) is located in your Rhodes source code
|
|
141
141
|
|
142
142
|
From the XCode 4.2 Apple was removed default support of armv6 architecture. In this case there are two issues:
|
143
143
|
|
144
|
-
* Distributution build should include code for armv6 and armv7 both. Our projects already fixed for this
|
145
|
-
* If you want build/run/debug your application on devices before iPhone/iPad (for example on iPhone 3G), you should manually path all
|
144
|
+
* Distributution build should include code for armv6 and armv7 both. Our projects already fixed for this.
|
145
|
+
* If you want build/run/debug your application on devices before iPhone/iPad (for example on iPhone 3G), you should manually path all your (our already fixed) native extension xcode projects used in your application for Architecture settings:
|
146
146
|
in each project modify [Build Settings]-[Architectures]-[Debug]/[Release]:
|
147
147
|
remove $(ARCHS_STANDARD_32_BIT)
|
148
148
|
add two architectures manually: "armv7" and "armv6"
|
@@ -199,6 +199,14 @@ The default build.yml settings generated for iphone are:
|
|
199
199
|
emulatortarget: iphone
|
200
200
|
BundleIdentifier: com.yourcompany.yourapp
|
201
201
|
BundleURLScheme: yourapp
|
202
|
+
entitlements_file: "./production/Entitlements.plist"
|
203
|
+
production:
|
204
|
+
app_plist_title: "myapp"
|
205
|
+
app_plist_subtitle: "myapp"
|
206
|
+
app_plist_icon_url: "www.yourcompany.com/icon.png"
|
207
|
+
app_plist_ipa_url: "www.yourcompany.com/myapp.ipa"
|
208
|
+
ipa_itunesartwork_image: "./production/image.jpg"
|
209
|
+
|
202
210
|
|
203
211
|
* name: name of your application. Will show on screen (iPhone application bundle display name)
|
204
212
|
* version: version of your application. iPhone application bundle version
|
@@ -211,6 +219,14 @@ The default build.yml settings generated for iphone are:
|
|
211
219
|
* emulatortarget: device family for simulator (iphone/ipad)
|
212
220
|
* BundleIdentifier: bundle identifier - used in provisioning profile
|
213
221
|
* BundleURLScheme: bundle URL scheme of your app (used for opening your application from another application by using custom URL scheme)
|
222
|
+
* entitlements_file: path of your custom Entitlements.plist (if you want use own instead of default) - you also can just put Entitlements.plist file into root folder of your application and it will be automaticallly used during build
|
223
|
+
* production: section used only for Ad Hoc distribution, contain some specific options for prepare .plist and *.ipa files etc.
|
224
|
+
* app_plist_title: title in plist file (application name by default)
|
225
|
+
* app_plist_subtitle: subtitle in plist file (application name by default)
|
226
|
+
* app_plist_icon_url: icon url writed in plist file
|
227
|
+
* app_plist_ipa_url: IPA file url writed in plist file
|
228
|
+
* ipa_itunesartwork_image: path to iTunesArtwork image included into IPA file (must be 512x512 JPG image)
|
229
|
+
|
214
230
|
|
215
231
|
** NOTE: BundleIdentifier and BundleURLScheme can contain only next symbols : "a"-"z", "A"-"Z", "0"-"9", "-", "." !
|
216
232
|
|
@@ -180,6 +180,13 @@ RHO_GLOBAL void JNICALL Java_com_rhomobile_rhodes_RhodesService_doRequest
|
|
180
180
|
rho_net_request(url.c_str());
|
181
181
|
}
|
182
182
|
|
183
|
+
RHO_GLOBAL void JNICALL Java_com_rhomobile_rhodes_RhodesService_doRequestAsync
|
184
|
+
(JNIEnv *env, jobject, jstring strUrl)
|
185
|
+
{
|
186
|
+
std::string const &url = rho_cast<std::string>(strUrl);
|
187
|
+
RHODESAPP().runCallbackInThread(url.c_str(), "");
|
188
|
+
}
|
189
|
+
|
183
190
|
RHO_GLOBAL jstring JNICALL Java_com_rhomobile_rhodes_RhodesService_normalizeUrl
|
184
191
|
(JNIEnv *env, jobject, jstring strUrl)
|
185
192
|
{
|
@@ -241,6 +241,7 @@ public class RhodesService extends Service {
|
|
241
241
|
public native String normalizeUrl(String url);
|
242
242
|
|
243
243
|
public native void doRequest(String url);
|
244
|
+
public native void doRequestAsync(String url);
|
244
245
|
|
245
246
|
public static native void loadUrl(String url);
|
246
247
|
|
@@ -34,6 +34,9 @@
|
|
34
34
|
UIView* parentView;
|
35
35
|
UIView* prevView;
|
36
36
|
NSString* imageFormat;
|
37
|
+
unsigned int penColor;
|
38
|
+
float penWidth;
|
39
|
+
unsigned int bgColor;
|
37
40
|
}
|
38
41
|
|
39
42
|
|
@@ -42,6 +45,12 @@
|
|
42
45
|
-(void)setSignatureViewControllerValue:(SignatureViewController *)svc;
|
43
46
|
-(void)setParentView:(UIView*)parent_view;
|
44
47
|
-(void)setPrevView:(UIView*)prev_view;
|
48
|
+
|
45
49
|
-(void)setImageFormat:(NSString*)format;
|
50
|
+
-(void)setPenColor:(unsigned int)value;
|
51
|
+
-(void)setPenWidth:(float)value;
|
52
|
+
-(void)setBgColor:(unsigned int)value;
|
53
|
+
|
54
|
+
|
46
55
|
|
47
56
|
@end
|
@@ -33,9 +33,27 @@
|
|
33
33
|
|
34
34
|
@implementation SignatureDelegate
|
35
35
|
|
36
|
+
-(id) init
|
37
|
+
{
|
38
|
+
if (self = [super init])
|
39
|
+
{
|
40
|
+
signatureViewController = nil;
|
41
|
+
parentView = nil;
|
42
|
+
prevView = nil;
|
43
|
+
imageFormat = nil;
|
44
|
+
penColor = 0;
|
45
|
+
penWidth = 0;
|
46
|
+
bgColor = 0;
|
47
|
+
|
48
|
+
}
|
49
|
+
return self;
|
50
|
+
}
|
36
51
|
|
37
52
|
-(void)setSignatureViewControllerValue:(SignatureViewController *)svc {
|
38
53
|
signatureViewController = svc;
|
54
|
+
[signatureViewController setPenColor:penColor];
|
55
|
+
[signatureViewController setPenWidth:penWidth];
|
56
|
+
[signatureViewController setBgColor:bgColor];
|
39
57
|
}
|
40
58
|
|
41
59
|
-(void)setParentView:(UIView*)parent_view {
|
@@ -50,6 +68,21 @@
|
|
50
68
|
imageFormat = format;
|
51
69
|
}
|
52
70
|
|
71
|
+
-(void)setPenColor:(unsigned int)value
|
72
|
+
{
|
73
|
+
penColor = value;
|
74
|
+
}
|
75
|
+
|
76
|
+
-(void)setPenWidth:(float)value
|
77
|
+
{
|
78
|
+
penWidth = value;
|
79
|
+
}
|
80
|
+
|
81
|
+
-(void)setBgColor:(unsigned int)value
|
82
|
+
{
|
83
|
+
bgColor = value;
|
84
|
+
}
|
85
|
+
|
53
86
|
|
54
87
|
- (void)useImage:(UIImage*)theImage {
|
55
88
|
NSString *folder = [[AppManager getApplicationsRootPath] stringByAppendingPathComponent:@"/../db/db-files"];
|
@@ -89,8 +122,10 @@
|
|
89
122
|
[self useImage:image];
|
90
123
|
[signatureViewController.view removeFromSuperview];
|
91
124
|
[signatureViewController release];
|
125
|
+
signatureViewController = nil;
|
92
126
|
[parentView addSubview:prevView];
|
93
127
|
[prevView release];
|
128
|
+
prevView = nil;
|
94
129
|
[image release];
|
95
130
|
}
|
96
131
|
|
@@ -98,8 +133,10 @@
|
|
98
133
|
rho_rhodesapp_callSignatureCallback([postUrl UTF8String], "", "", 1);
|
99
134
|
[signatureViewController.view removeFromSuperview];
|
100
135
|
[signatureViewController release];
|
136
|
+
signatureViewController = nil;
|
101
137
|
[parentView addSubview:prevView];
|
102
138
|
[prevView release];
|
139
|
+
prevView = nil;
|
103
140
|
}
|
104
141
|
|
105
142
|
|
@@ -109,19 +146,47 @@
|
|
109
146
|
void rho_signature_take(char* callback_url, rho_param* p) {
|
110
147
|
NSString *url = [NSString stringWithUTF8String:callback_url];
|
111
148
|
char* image_format = 0;
|
149
|
+
char* penColor = 0;
|
150
|
+
char* penWidth = 0;
|
151
|
+
char* bgColor = 0;
|
152
|
+
|
112
153
|
if (p)
|
113
154
|
{
|
114
155
|
rho_param* pFF = rho_param_hash_get(p, "imageFormat");
|
115
156
|
if ( pFF )
|
116
157
|
image_format = pFF->v.string;
|
158
|
+
pFF = rho_param_hash_get(p, "penColor");
|
159
|
+
if ( pFF )
|
160
|
+
penColor = pFF->v.string;
|
161
|
+
pFF = rho_param_hash_get(p, "penWidth");
|
162
|
+
if ( pFF )
|
163
|
+
penWidth = pFF->v.string;
|
164
|
+
pFF = rho_param_hash_get(p, "bgColor");
|
165
|
+
if ( pFF )
|
166
|
+
bgColor = pFF->v.string;
|
117
167
|
}
|
118
168
|
if (!image_format)
|
119
|
-
image_format = "";
|
169
|
+
image_format = "png";
|
170
|
+
if (!penColor)
|
171
|
+
penColor = "0xFF66009A";
|
172
|
+
if (!penWidth)
|
173
|
+
penWidth = "3";
|
174
|
+
if (!bgColor)
|
175
|
+
bgColor = "0xFFFFFFFF";
|
176
|
+
|
177
|
+
|
178
|
+
|
179
|
+
NSString* ns_penColor = [NSString stringWithUTF8String:penColor];
|
180
|
+
NSString* ns_penWidth = [NSString stringWithUTF8String:penWidth];
|
181
|
+
NSString* ns_bgColor = [NSString stringWithUTF8String:bgColor];
|
120
182
|
|
121
183
|
NSString *iformat = [NSString stringWithUTF8String:image_format];
|
122
184
|
Rhodes* rho = [Rhodes sharedInstance];
|
123
185
|
SignatureDelegate* deleg = rho.signatureDelegate;
|
124
186
|
[deleg setImageFormat:iformat];
|
187
|
+
[deleg setPenColor:(unsigned int)[ns_penColor longLongValue]];
|
188
|
+
[deleg setPenWidth:[ns_penWidth floatValue]];
|
189
|
+
[deleg setBgColor:(unsigned int)[ns_bgColor longLongValue]];
|
125
190
|
[[Rhodes sharedInstance] performSelectorOnMainThread:@selector(takeSignature:)
|
126
191
|
withObject:url waitUntilDone:NO];
|
127
192
|
}
|
@@ -34,6 +34,9 @@
|
|
34
34
|
|
35
35
|
CGMutablePathRef mPath;
|
36
36
|
CGPoint mLastPoint;
|
37
|
+
unsigned int penColor;
|
38
|
+
float penWidth;
|
39
|
+
unsigned int bgColor;
|
37
40
|
|
38
41
|
}
|
39
42
|
|
@@ -46,4 +49,9 @@
|
|
46
49
|
- (void)touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event;
|
47
50
|
- (void)touchesCancelled:(NSSet *)touches withEvent:(UIEvent *)event;
|
48
51
|
|
52
|
+
-(void)setPenColor:(unsigned int)value;
|
53
|
+
-(void)setPenWidth:(float)value;
|
54
|
+
-(void)setBgColor:(unsigned int)value;
|
55
|
+
|
56
|
+
|
49
57
|
@end
|
@@ -88,6 +88,23 @@
|
|
88
88
|
}
|
89
89
|
|
90
90
|
|
91
|
+
-(void)setPenColor:(unsigned int)value
|
92
|
+
{
|
93
|
+
penColor = value;
|
94
|
+
[self setNeedsDisplay];
|
95
|
+
}
|
96
|
+
|
97
|
+
-(void)setPenWidth:(float)value
|
98
|
+
{
|
99
|
+
penWidth = value;
|
100
|
+
[self setNeedsDisplay];
|
101
|
+
}
|
102
|
+
|
103
|
+
-(void)setBgColor:(unsigned int)value
|
104
|
+
{
|
105
|
+
bgColor = value;
|
106
|
+
[self setNeedsDisplay];
|
107
|
+
}
|
91
108
|
|
92
109
|
- (id)initWithFrame:(CGRect)frame {
|
93
110
|
if ((self = [super initWithFrame:frame])) {
|
@@ -96,6 +113,9 @@
|
|
96
113
|
self.backgroundColor = [UIColor whiteColor];
|
97
114
|
self.opaque = YES;
|
98
115
|
self.multipleTouchEnabled = NO;
|
116
|
+
penColor = 0xFF66009A;
|
117
|
+
penWidth = 3.0;
|
118
|
+
bgColor = 0xFFFFFFFF;
|
99
119
|
}
|
100
120
|
mPath = nil;
|
101
121
|
[self doClear];
|
@@ -110,12 +130,21 @@
|
|
110
130
|
CGContextRef context = UIGraphicsGetCurrentContext();
|
111
131
|
|
112
132
|
// draw backgound
|
113
|
-
|
114
|
-
|
133
|
+
|
134
|
+
CGContextSetRGBFillColor(context, ((float)((bgColor & 0xFF0000) >> 16))/255.0,
|
135
|
+
((float)((bgColor & 0xFF00) >> 8))/255.0,
|
136
|
+
((float)((bgColor & 0xFF)))/255.0,
|
137
|
+
1);
|
138
|
+
|
139
|
+
|
140
|
+
CGContextSetRGBStrokeColor(context, ((float)((penColor & 0xFF0000) >> 16))/255.0,
|
141
|
+
((float)((penColor & 0xFF00) >> 8))/255.0,
|
142
|
+
((float)((penColor & 0xFF)))/255.0,
|
143
|
+
1);
|
115
144
|
CGContextFillRect(context, rect);
|
116
145
|
|
117
146
|
// draw signature
|
118
|
-
CGContextSetLineWidth(context,
|
147
|
+
CGContextSetLineWidth(context, penWidth);
|
119
148
|
CGContextBeginPath(context);
|
120
149
|
CGContextClipToRect(context, rect);
|
121
150
|
//CGContextClip(context);
|
@@ -142,13 +171,21 @@
|
|
142
171
|
rect.origin.y = 0;
|
143
172
|
|
144
173
|
// draw backgound
|
145
|
-
CGContextSetRGBFillColor(context,
|
146
|
-
|
174
|
+
CGContextSetRGBFillColor(context, ((float)((bgColor & 0xFF0000) >> 16))/255.0,
|
175
|
+
((float)((bgColor & 0xFF00) >> 8))/255.0,
|
176
|
+
((float)((bgColor & 0xFF)))/255.0,
|
177
|
+
1);
|
178
|
+
|
179
|
+
|
180
|
+
CGContextSetRGBStrokeColor(context, ((float)((penColor & 0xFF0000) >> 16))/255.0,
|
181
|
+
((float)((penColor & 0xFF00) >> 8))/255.0,
|
182
|
+
((float)((penColor & 0xFF)))/255.0,
|
183
|
+
1);
|
147
184
|
CGContextFillRect(context, rect);
|
148
185
|
|
149
186
|
// draw signature
|
150
187
|
if (!CGPathIsEmpty(mPath)) {
|
151
|
-
|
188
|
+
CGContextSetLineWidth(context, penWidth);
|
152
189
|
CGContextTranslateCTM (context, 0, rect.size.height);
|
153
190
|
CGContextScaleCTM(context, 1, -1);
|
154
191
|
CGContextBeginPath(context);
|
@@ -29,15 +29,21 @@
|
|
29
29
|
#import "RhoViewController.h"
|
30
30
|
|
31
31
|
@class SignatureDelegate;
|
32
|
+
@class SignatureView;
|
32
33
|
|
33
34
|
@interface SignatureViewController : RhoViewController {
|
34
|
-
|
35
|
+
SignatureView *signatureView;
|
35
36
|
UIToolbar *toolbar;
|
36
37
|
SignatureDelegate* signatureDelegate;
|
38
|
+
|
37
39
|
}
|
38
40
|
|
39
41
|
- (id)initWithRect:(CGRect)rect delegate:(SignatureDelegate*)delegate;
|
40
42
|
|
41
43
|
- (void)loadView;
|
42
44
|
|
45
|
+
-(void)setPenColor:(unsigned int)value;
|
46
|
+
-(void)setPenWidth:(float)value;
|
47
|
+
-(void)setBgColor:(unsigned int)value;
|
48
|
+
|
43
49
|
@end
|
@@ -42,7 +42,7 @@
|
|
42
42
|
|
43
43
|
|
44
44
|
- (id)initWithRect:(CGRect)rect delegate:(SignatureDelegate*)delegate {
|
45
|
-
|
45
|
+
self = [super init];
|
46
46
|
|
47
47
|
signatureDelegate = delegate;
|
48
48
|
self.view.frame = rect;
|
@@ -105,6 +105,21 @@
|
|
105
105
|
|
106
106
|
}
|
107
107
|
|
108
|
+
-(void)setPenColor:(unsigned int)value
|
109
|
+
{
|
110
|
+
[signatureView setPenColor:value];
|
111
|
+
}
|
112
|
+
|
113
|
+
-(void)setPenWidth:(float)value
|
114
|
+
{
|
115
|
+
[signatureView setPenWidth:value];
|
116
|
+
}
|
117
|
+
|
118
|
+
-(void)setBgColor:(unsigned int)value
|
119
|
+
{
|
120
|
+
[signatureView setBgColor:value];
|
121
|
+
}
|
122
|
+
|
108
123
|
|
109
124
|
// Implement loadView to create a view hierarchy programmatically, without using a nib.
|
110
125
|
- (void)loadView {
|
data/version
CHANGED
@@ -1 +1 @@
|
|
1
|
-
3.3.
|
1
|
+
3.3.1
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rhodes
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 9
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 3
|
8
8
|
- 3
|
9
|
-
-
|
10
|
-
version: 3.3.
|
9
|
+
- 1
|
10
|
+
version: 3.3.1
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Rhomobile
|